<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div id="header">
	<h1 id="logo">
		<a href="<c:url value="/home"/>">BABYSHOP</a>
	</h1>

	<c:if test="${not empty account}">
		<!-- Cart -->
		<div id="cart">
			<a href="<c:url value="/cart"/>" class="cart-link"><spring:message
					code="yourcart" /></a> <span><a href="<c:url value="/logout"/>"
				class="white-link" style="float: right;"><spring:message
						code="logout" /></a></span>
			<div class="cl">&nbsp;</div>
			<span><spring:message code="numitems" />: <strong>${account.cart.numItems}</strong></span>
			&nbsp;&nbsp; <span><spring:message code="total" />: <strong><fmt:formatNumber
						type="number" value="${account.cart.total}" groupingUsed="true" />
					VNĐ</strong> </span>
		</div>
		<!-- End Cart -->
	</c:if>

	<!-- Navigation -->
	<div id="navigation">
		<ul>

			<li><a href="<c:url value="/home"/>"
				<c:if test="${page == 'HomePage'}">class="active"</c:if>><spring:message
						code="homepage" /></a></li>
			<c:choose>
				<c:when test="${not empty account}">
					<li><a href="<c:url value="/account"/>"
						<c:if test="${page == 'AccountPage'}">class="active"</c:if>><spring:message
								code="account" /></a></li>
				</c:when>
				<c:otherwise>
					<li><a href="<c:url value="/login"/>"
						<c:if test="${page == 'LoginPage'}">class="active"</c:if>><spring:message
								code="login" /></a></li>
					<li><a href="<c:url value="/register"/>"
						<c:if test="${page == 'RegisterPage'}">class="active"</c:if>><spring:message
								code="register" /></a></li>
				</c:otherwise>
			</c:choose>
			<li><a href="<c:url value="/about"/>"
				<c:if test="${page == 'AboutPage'}">class="active"</c:if>><spring:message
						code="about" /></a></li>
			<li><a href="?lang=vi">VI</a><a href="?lang=en">EN</a></li>
		</ul>
	</div>
	<!-- End Navigation -->
</div>